// @ts-ignore
/* eslint-disable */
import { OpenApi as request } from "@/utils/request";

/** 添加品牌 POST /supplyChain/goods/brand */
export async function add1(
  body: API.SupplyChainGoodsBrandDto,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean>(
    `/barter-goods/supplyChain/goods/brand`,
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** 品牌详情 GET /supplyChain/goods/brand/${param0} */
export async function detail2(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.detail2Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseSupplyChainGoodsBrandVo>(
    `/barter-goods/supplyChain/goods/brand/${param0}`,
    {
      method: "GET",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}

/** 更新品牌 PUT /supplyChain/goods/brand/${param0} */
export async function edit1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.edit1Params,
  body: API.SupplyChainGoodsBrandDto,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(
    `/barter-goods/supplyChain/goods/brand/${param0}`,
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      params: { ...queryParams },
      data: body,
      ...(options || {}),
    }
  );
}

/** 删除品牌 DELETE /supplyChain/goods/brand/${param0} */
export async function del1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.del1Params,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params;
  return request<API.BaseResponseBoolean>(
    `/barter-goods/supplyChain/goods/brand/${param0}`,
    {
      method: "DELETE",
      params: { ...queryParams },
      ...(options || {}),
    }
  );
}

/** 品牌所有 GET /supplyChain/goods/brand/all */
export async function all1(options?: { [key: string]: any }) {
  return request<API.BaseResponseListSupplyChainGoodsBrandVo>(
    `/barter-goods/supplyChain/goods/brand/all`,
    {
      method: "GET",
      ...(options || {}),
    }
  );
}

/** 品牌分页 GET /supplyChain/goods/brand/list */
export async function listPage1(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.listPage1Params,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageRespSupplyChainGoodsBrandVo>(
    `/barter-goods/supplyChain/goods/brand/list`,
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
